package com.lej.dataservice.club.bean.main.home

/**
 *  author: cjq
 *  date  : 2022/6/15 0015
 *  desc  : 数字藏品证书
 *  {
"code": 200,
"msg": "成功",
"data": {
"name":"名称",
"image":"图片",
"descripe":"故事",
"id": 469,
"chain_name": "BSN文昌链",
"trade_hash":"交易hash",
"collection_count":"藏品数"
"number":"编号",
"user_nick":"用户昵称",
"user_avatar":"拥有者头像",
"nft_id": 78,
"host_address": "iaa1692faknmnay0t2w4fp62tf09nkceufc0av48gk",
"hash_token": "dayou1640093363419567942",
"block_hash": 9156461,
"time_stamp": 1641970794,
"time_stamp_format": "Y年m月d日",
"chain_browser": "https://explorer.wenchang.bianjie.ai/"
}
}
 */
data class NftPackageInfo(val number:String?,val hash_token:String?){
    fun getAddress() = when {
        hash_token.isNullOrEmpty() -> {
            ""
        }
        hash_token.length>8 -> {
            hash_token.replaceRange(5,hash_token.length-3,"**")
        }
        else -> {
            hash_token
        }
    }
}
